package com.richapp.launcher.scene.abstracts;

import com.richapp.launcher.database.system.dao.ConditionSensorModelDao;
import com.richapp.launcher.database.system.dao.DeviceModelDao;
import com.richapp.launcher.database.system.mode.ConditionSensorModel;
import com.richapp.launcher.database.system.mode.DeviceModel;
import com.richapp.launcher.scene.SceneServer;
import com.richapp.launcher.scene.interfaces.ISceneSensorConditions;

public abstract class SceneAbstractSensorConditions implements ISceneSensorConditions {

	private String boxCpuId = "0";
	private String deviceId = "00";
	private String deviceNumber = "00";
    private String way = "00";
    private String deviceName = "00";
	
	private int[] conditionCheckModel = new int[]{-1,-1};
	
	public SceneAbstractSensorConditions() {
		
	}

	public String getBoxCpuId() {
		return boxCpuId;
	}

	public void setBoxCpuId(String boxCpuId) {
		this.boxCpuId = boxCpuId;
	}

	public String getDeviceId() {
		return deviceId;
	}

	public void setDeviceId(String deviceId) {
		this.deviceId = deviceId;
	}

	public String getDeviceNumber() {
		return deviceNumber;
	}

	public void setDeviceNumber(String deviceNumber) {
		this.deviceNumber = deviceNumber;
	}

    public String getWay() {
        return way;
    }

    public void setWay(String way) {
        this.way = way;
    }

    public String getDeviceName() {
        return deviceName;
    }

    public void setDeviceName(String deviceName) {
        this.deviceName = deviceName;
    }


	@Override
	public DeviceModel getDevice() {
		DeviceModelDao dmd = new DeviceModelDao(SceneServer.getInstance().getContext());
		return dmd.getByCpuIdDeviceIdDeviceNumber(boxCpuId, deviceId, deviceNumber,way);
	}


	public int[] getConditionCheckModel() {
		return conditionCheckModel;
	}

	public void setConditionCheckModel(int[] conditionCheckModel) {
		this.conditionCheckModel = conditionCheckModel;
	}
}
